<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>抽奖</title>
	</head>
	<body>
		<div id="luck"></div>
		<input type="button" value="抽奖" id="choujiang" />
		
		<script>
			var phones=["18155112897","15155112611","14866126115","16155112811","15145412611"];
			luck.innerHTML=phones[0];
			
			var timer;
			
			choujiang.onclick=function(){
				if(choujiang.value=="停"){
					clearInterval(timer);
					choujiang.value="抽奖";
				}else{
					timer=setInterval(f,10);
					choujiang.value="停";
				}
			};
			function f(){
				luck.innerHTML=phones[Math.floor(Math.random()*phones.length)];
			}
		</script>
	</body>
</html>
